#-*-coding:utf-8-*-
def doubleNum(num):
    back=''
    if num<10:
        back='0'+str(num)
    else:
        back=str(num)
    return back



def formatFrame(framenum,FPS):

    seconds= framenum/FPS
    frame_left=framenum- seconds*24

    print(seconds,frame_left)

    minutes=0
    seconds_left=0

    hours=0

    minutes_left=0
    if seconds>=60:
        minutes=seconds/60
        seconds_left=seconds - minutes*60


        if minutes>60:
            hours=minutes/60
            minutes_left=minutes-hours*60
        else:
            minutes_left=minutes
    else:
        seconds_left=seconds


    strhours = doubleNum(hours)
    strminutes = doubleNum(minutes_left)
    strseconds = doubleNum(seconds_left)
    strframe_left = doubleNum(frame_left)

    return ('{0}:{1}:{2}:{3}'.format(strhours,strminutes,strseconds,strframe_left))



print(formatFrame(113,24))